package com.citibank.template.dao;

import java.util.List;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.springframework.beans.factory.annotation.Autowired;

abstract class GenericDAOImpl<T> implements GenericDAOInterface<T> {
	
	@Autowired
	private SessionFactory sf;
	
	public void beginTransaction() {
		SessionFactory sf = new Configuration().configure().buildSessionFactory();

		System.out.println("beginTransaction");
	}

	public void commit() {
		System.out.println("commit");
	}

	public T save(T entity) {
		System.out.println("save");
		return null;
	}

	public void delete(T entity) {
		System.out.println("delete");
	}

	public List<T> listAll() {
		System.out.println("listAll");
		return null;
	}

	public T find(int id) {
		System.out.println("find");
		return null;
	}
	
}
